home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 726-750 / 745 / arexxbox / test / rx_test_rxif.c.backup < prev    next >
Text File  |  1995-03-18  |  4KB  |  238 lines

  1. /*
  2.  * Source generated with ARexxBox 1.00 (Jun 19 1992)
  3.  * which is Copyright (c) 1992 Michael Balzer
  4.  */
  5.  
  6. #include <exec/types.h>
  7. #include <exec/memory.h>
  8. #include <dos/dos.h>
  9. #include <rexx/storage.h>
  10. #include <rexx/rxslib.h>
  11.  
  12. #ifdef __GNUC__
  13. /* GCC needs all struct defs */
  14. #include <dos/exall.h>
  15. #include <graphics/graphint.h>
  16. #include <intuition/classes.h>
  17. #include <devices/keymap.h>
  18. #include <exec/semaphores.h>
  19. #endif
  20.  
  21. #include <clib/alib_protos.h>
  22. #include <clib/exec_protos.h>
  23. #include <clib/dos_protos.h>
  24. #include <clib/rexxsyslib_protos.h>
  25.  
  26. #ifndef __NO_PRAGMAS
  27.  
  28. #ifdef AZTEC_C
  29. #include <pragmas/exec_lib.h>
  30. #include <pragmas/dos_lib.h>
  31. #include <pragmas/rexxsyslib_lib.h>
  32. #endif
  33.  
  34. #ifdef LATTICE
  35. #include <pragmas/exec_pragmas.h>
  36. #include <pragmas/dos_pragmas.h>
  37. #include <pragmas/rexxsyslib_pragmas.h>
  38. #endif
  39.  
  40. #endif /* __NO_PRAGMAS */
  41.  
  42. #include <stdlib.h>
  43. #include <stdio.h>
  44. #include <string.h>
  45. #include <ctype.h>
  46.  
  47. #ifndef _toupper
  48. #define _toupper(x) ((x) & 0x5f)
  49. #endif
  50.  
  51. #include "rx_test.h"
  52.  
  53.  
  54. extern struct Library *SysBase, *DOSBase, *RexxSysBase;
  55.  
  56.  
  57. #include "/rxif/rx_help.c"
  58.  
  59. void rx_inout( struct RexxHost *host, struct rxd_inout **rxd, long action )
  60. {
  61.     struct rxd_inout *rd = *rxd;
  62.     static long a1 = 4711;
  63.  
  64.     switch( action )
  65.     {
  66.         case RXIF_INIT:
  67.             *rxd = calloc( sizeof *rd, 1 );
  68.             if( rd = *rxd )
  69.             {
  70.                 /* set your DEFAULTS here */
  71.                 rd->arg.arg1 = &a1;
  72.             }
  73.             break;
  74.             
  75.         case RXIF_ACTION:
  76.             /* Insert your CODE here */
  77.             printf( "\ninout var=%s, stem=%s, arg1=%ld\n",
  78.                 rd->arg.var ? rd->arg.var : "<n.a.>",
  79.                 rd->arg.stem ? rd->arg.stem : "<n.a.>",
  80.                 *rd->arg.arg1 );
  81.             
  82.             rd->res.res1 = "Dies ist das Resultat!";
  83.             break;
  84.         
  85.         case RXIF_FREE:
  86.             /* FREE your local data here */
  87.             free( rd );
  88.             break;
  89.     }
  90.     return;
  91. }
  92.  
  93. void rx_multi_in_num( struct RexxHost *host, struct rxd_multi_in_num **rxd, long action )
  94. {
  95.     struct rxd_multi_in_num *rd = *rxd;
  96.     long **s;
  97.  
  98.     switch( action )
  99.     {
  100.         case RXIF_INIT:
  101.             *rxd = calloc( sizeof *rd, 1 );
  102.             break;
  103.             
  104.         case RXIF_ACTION:
  105.             /* Insert your CODE here */
  106.             printf( "\nmulti_in_num: liste=%lx\n", rd->arg.liste );
  107.             if( s = rd->arg.liste )
  108.                 for( ; *s; s++ )
  109.                     printf( "Liste: %ld\n", **s );
  110.             break;
  111.         
  112.         case RXIF_FREE:
  113.             /* FREE your local data here */
  114.             free( rd );
  115.             break;
  116.     }
  117.     return;
  118. }
  119.  
  120. void rx_multi_in_str( struct RexxHost *host, struct rxd_multi_in_str **rxd, long action )
  121. {
  122.     struct rxd_multi_in_str *rd = *rxd;
  123.     char **s;
  124.  
  125.     switch( action )
  126.     {
  127.         case RXIF_INIT:
  128.             *rxd = calloc( sizeof *rd, 1 );
  129.             break;
  130.             
  131.         case RXIF_ACTION:
  132.             /* Insert your CODE here */
  133.             printf( "\nmulti_in_str: liste=%lx\n", rd->arg.liste );
  134.             if( s = rd->arg.liste )
  135.                 for( ; *s; s++ )
  136.                     printf( "Liste: %s\n", *s );
  137.             break;
  138.         
  139.         case RXIF_FREE:
  140.             /* FREE your local data here */
  141.             free( rd );
  142.             break;
  143.     }
  144.     return;
  145. }
  146.  
  147. void rx_multi_out_num( struct RexxHost *host, struct rxd_multi_out_num **rxd, long action )
  148. {
  149.     struct rxd_multi_out_num *rd = *rxd;
  150.     static long a=123, b=234, c=345;
  151.     static long *aa[4];
  152.  
  153.     switch( action )
  154.     {
  155.         case RXIF_INIT:
  156.             *rxd = calloc( sizeof *rd, 1 );
  157.             break;
  158.             
  159.         case RXIF_ACTION:
  160.             /* Insert your CODE here */
  161.             aa[0] = &a;
  162.             aa[1] = &b;
  163.             aa[2] = &c;
  164.             aa[3] = NULL;
  165.             rd->res.liste = aa;
  166.             break;
  167.         
  168.         case RXIF_FREE:
  169.             /* FREE your local data here */
  170.             free( rd );
  171.             break;
  172.     }
  173.     return;
  174. }
  175.  
  176. void rx_multi_out_str( struct RexxHost *host, struct rxd_multi_out_str **rxd, long action )
  177. {
  178.     struct rxd_multi_out_str *rd = *rxd;
  179.     static char *a[] = { "abc","bcd","cde","def","huhu", NULL };
  180.  
  181.     switch( action )
  182.     {
  183.         case RXIF_INIT:
  184.             *rxd = calloc( sizeof *rd, 1 );
  185.             break;
  186.             
  187.         case RXIF_ACTION:
  188.             /* Insert your CODE here */
  189.             rd->res.liste = a;
  190.             break;
  191.         
  192.         case RXIF_FREE:
  193.             /* FREE your local data here */
  194.             free( rd );
  195.             break;
  196.     }
  197.     return;
  198. }
  199.  
  200. void rx_open( struct RexxHost *host, struct rxd_open **rxd, long action )
  201. {
  202.     struct rxd_open *rd = *rxd;
  203.  
  204.     switch( action )
  205.     {
  206.         case RXIF_INIT:
  207.             *rxd = calloc( sizeof *rd, 1 );
  208.             if( rd = *rxd )
  209.             {
  210.                 /* set your DEFAULTS here */
  211.                 rd->arg.file = "default_file";
  212.             }
  213.             break;
  214.             
  215.         case RXIF_ACTION:
  216.             /* Insert your CODE here */
  217.             printf( "\nopen file=%s prompt=%ld\n",
  218.                 rd->arg.file, rd->arg.prompt );
  219.             break;
  220.         
  221.         case RXIF_FREE:
  222.             /* FREE your local data here */
  223.             free( rd );
  224.             break;
  225.     }
  226.     return;
  227. }
  228.  
  229.  
  230. #ifndef RX_ALIAS_C
  231. char *ExpandRXCommand( struct RexxHost *host, char *command )
  232. {
  233.     /* Insert your ALIAS-HANDLER here */
  234.     return( NULL );
  235. }
  236. #endif
  237.  
  238.